package com.ruoyi.storehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.storehouse.mapper.StockStorehouseMapper;
import com.ruoyi.storehouse.domain.StockStorehouse;
import com.ruoyi.storehouse.service.IStockStorehouseService;

/**
 * 库房管理Service业务层处理
 * 
 * @author yx
 * @date 2024-12-19
 */
@Service
public class StockStorehouseServiceImpl implements IStockStorehouseService 
{
    @Autowired
    private StockStorehouseMapper stockStorehouseMapper;

    /**
     * 查询库房管理
     * 
     * @param storehouseId 库房管理主键
     * @return 库房管理
     */
    @Override
    public StockStorehouse selectStockStorehouseByStorehouseId(Integer storehouseId)
    {
        return stockStorehouseMapper.selectStockStorehouseByStorehouseId(storehouseId);
    }

    /**
     * 查询库房管理列表
     * 
     * @param stockStorehouse 库房管理
     * @return 库房管理
     */
    @Override
    public List<StockStorehouse> selectStockStorehouseList(StockStorehouse stockStorehouse)
    {
        return stockStorehouseMapper.selectStockStorehouseList(stockStorehouse);
    }

    /**
     * 新增库房管理
     * 
     * @param stockStorehouse 库房管理
     * @return 结果
     */
    @Override
    public int insertStockStorehouse(StockStorehouse stockStorehouse)
    {
        return stockStorehouseMapper.insertStockStorehouse(stockStorehouse);
    }

    /**
     * 修改库房管理
     * 
     * @param stockStorehouse 库房管理
     * @return 结果
     */
    @Override
    public int updateStockStorehouse(StockStorehouse stockStorehouse)
    {
        return stockStorehouseMapper.updateStockStorehouse(stockStorehouse);
    }

    /**
     * 批量删除库房管理
     * 
     * @param storehouseIds 需要删除的库房管理主键
     * @return 结果
     */
    @Override
    public int deleteStockStorehouseByStorehouseIds(Integer[] storehouseIds)
    {
        return stockStorehouseMapper.deleteStockStorehouseByStorehouseIds(storehouseIds);
    }

    /**
     * 删除库房管理信息
     * 
     * @param storehouseId 库房管理主键
     * @return 结果
     */
    @Override
    public int deleteStockStorehouseByStorehouseId(Integer storehouseId)
    {
        return stockStorehouseMapper.deleteStockStorehouseByStorehouseId(storehouseId);
    }
}
